import { lazy } from "react";
import { createBrowserRouter } from 'react-router-dom'
const Home = lazy(() => import('../page/Home/index'))
const Index = lazy(() => import('../page/Index/index'))
const Message = lazy(() => import('../page/Message/index'))
const Order = lazy(() => import('../page/Order/index'))
const Login = lazy(() => import('../page/Login/index'))
const App = lazy(() => import('../App'))
export const Zis = [
    [
        {
            path: '/home/index',
            element: <Index></Index>,
            title: '页面',
            icon: '',
        }
    ]
]
export const Zi = [
    {
        path: '/home',
        element: <Home></Home>,
        title: '首页',
        icon: '',
        children: Zis
    },
    {
        path: '/order',
        element: <Order></Order>,
        title: '订单',
        icon: ''

    }
]

const routes = createBrowserRouter([
    {
        path: '/',
        element: <App></App>,
        children: Zi
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '/message',
        element: <Message></Message>
    }
])
export default routes